<!DOCTYPE html>
<!--freemarker配置获得项目根路径-->
<#assign ctx=request.contextPath />
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="icon" href="${ctx}/static/favicon.ico">
    <title>Sql List</title>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }

        th,
        td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }

        th {
            background-color: #f2f2f2;
        }

        @media screen and (max-width: 600px) {
            table {
                font-size: 14px;
            }

            th,
            td {
                display: block;
                width: 100%;
            }

            th {
                text-align: center;
            }

            td {
                text-align: center;
            }
        }

        /* 右下角悬浮加号按钮 */
        #plus-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            opacity: 0.5;
            transition: opacity 0.5s ease;
            font-size: 20px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
        }

        #plus-btn:hover {
            opacity: 1;
        }

        /* 右下角悬浮加号按钮 */
    </style>
</head>

<body>
    <table>
        <caption></caption>
        <thead>
            <tr>
                <th>SQL TYPE</th>
                <th>IS ENABLED</th>
                <th>ID</th>
                <th>TITLE</th>
                <th>DESCRIPTION</th>
                <th>CONTENT</th>
            </tr>
        </thead>
        <tbody>
            <!-- <#list sqlList as sql> -->
            <tr>
                <td>${(sql.sqlType == 1) ? string('update', 'select')}</td>
                <td>${(sql.enabled == 1) ? string('enabled', 'disabled')}</td>
                <td>${sql.id?c}</td>
                <td>${sql.title}</td>
                <td>${sql.description}</td>
                <td>${sql.content}</td>
            </tr>
            <!-- </#list> -->
        </tbody>
    </table>
    <!-- 右下角悬浮加号按钮 -->
    <button id="plus-btn" onclick="window.location.href='${ctx}/page/sql-submit'">+</button>
    <!-- 右下角悬浮加号按钮 -->

    <script>

    </script>
</body>

</html>